
import java.io.Serializable;

public class Student implements Serializable {
    private String name;
    private String class_;
    private String id;

    private double grades;

    public Student(String name, String class_, String id , double grades) {
        this.name = name;
        this.class_ = class_;
        this.id = id;
        this.grades = grades;
    }

    public String getName() {
        return name;
    }

    public String getClass_() {
        return class_;
    }

    public String getId() {
        return id;
    }

    public double getGrades() {
        return grades;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setClass_(String class_) {
        this.class_ = class_;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setGrades(double grades) {
        this.grades = grades;
    }

    //返回学生的基本信息
    @Override
    public String toString() {
        return "学号: " + id + ", 姓名: " + name + ", 班级: " + class_ + ", 成绩：" + grades;
    }
}